# cmake最低版本号
cmake_minimum_required(VERSION 3.18.1)

# add_library:把一个library添加到工程
add_library(
        native-lib
        SHARED
        native-lib.cpp)

# 找到预编译库 log_lib 并link到我们的动态库 native-lib中
find_library( # Sets the name of the path variable.
        log-lib
        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log )


# 首个参数是target,后面的参数是item；target必须先用add_library()创建过；
target_link_libraries(
        native-lib
        ${log-lib} )